home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / circuits / irsim-9.000 / irsim-9 / make_ifsim < prev    next >
Text File  |  1995-02-16  |  963b  |  49 lines

  1. #!/bin/csh
  2. # Run this after make_irsim to build and install ifsim.
  3.  
  4. if( -f CFLAGS ) then
  5.     set sflags = `awk '{ print $1 }' CFLAGS`
  6. else
  7.     set sflags = ''
  8. endif
  9.  
  10. if ( $?XLIBDIR == 0 ) then
  11.     if ( -d /usr/X11R6 ) then
  12.         setenv XLIBDIR /usr/X11R6/lib
  13.     else if ( -d /usr/X386 ) then
  14.         setenv XLIBDIR /usr/X386/lib
  15.     endif
  16. endif
  17.  
  18. (cd src/fsim; make SYSF="$sflags")
  19. if ($status != 0) exit 1;
  20.  
  21. if( $?CAD_HOME == 1 ) then
  22.     echo 'Installing in CAD_HOME='$CAD_HOME 'instead of ~cad'
  23.     set cad_dir = $CAD_HOME
  24. else
  25.     echo 'Installing in ~cad'
  26.     set cad_dir = `echo ~cad`
  27.     if( $status != 0 ) exit 1
  28. endif
  29.  
  30. if( ! -d $cad_dir ) then
  31.     echo 'Install directory does not exist:' $cad_dir
  32.     exit 1
  33. endif
  34. if( ! -w $cad_dir ) then
  35.     echo 'Install directory is not writeable:' $cad_dir
  36.     exit 1
  37. endif
  38.  
  39. set man_dir = $cad_dir/man
  40. set bin_dir = $cad_dir/bin
  41. set doc_dir = $cad_dir/doc
  42.  
  43.  
  44. if( ! -d $bin_dir ) mkdir $bin_dir
  45. rm -f $bin_dir/ifsim
  46. cp src/fsim/ifsim $bin_dir
  47. chmod 555 $bin_dir/ifsim
  48.  
  49.